Try to handle PPS fixes in NMEA.
authorrobertl <robertl>
Mon, 17 Oct 2005 17:38:12 +0000 (17:38 +0000)
committerrobertl <robertl>
Mon, 17 Oct 2005 17:38:12 +0000 (17:38 +0000)
nmea.c

diff --git a/nmea.c b/nmea.c
index a0aa326eac237fe8471475fd1cf32a40c58b60ee..e0f0bc050614b7265e0c48899cedac70db309ce8 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -282,12 +282,16 @@ gpgga_parse(char *ibuf)
 
        waypt->hdop     = hdop;
 
-       if (fix==1) {
-               waypt->fix  = (nsats>3)?(fix_3d):(fix_2d);
-       }
-       else if (fix==2)
-       {
-               waypt->fix  = fix_dgps;
+       switch (fix) {
+               case 1:
+                       waypt->fix  = (nsats>3)?(fix_3d):(fix_2d);
+                       break;
+               case 2:
+                       waypt->fix = fix_dgps;
+                       break;
+               case 3:
+                       waypt->fix = fix_pps
+                       break;
        }
 
        curr_waypt = waypt;
@@ -603,6 +607,9 @@ nmea_trackpt_pr(const waypoint *wpt)
        case fix_2d:
                fix='1';
                break;
+       case fix_pps:
+               fix='3';
+               break;
        default:
                fix='0';
        }